package com.xuecheng.auth.controller;


import com.xuecheng.base.execption.ValidationGroups;
import com.xuecheng.ucenter.model.dto.FindPasswordDto;
import com.xuecheng.ucenter.model.dto.RegisterDto;
import com.xuecheng.ucenter.service.RegisterService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@Api(value = "注册账号接口",tags = "注册账号接口")
@RestController
@RequiredArgsConstructor
@Slf4j
public class RegisterController {

    @Autowired(required = false)
    RegisterService registerService;

    @ApiOperation("注册账号")
    @PostMapping("/register")
    public  void registerInfo(@RequestBody @Validated RegisterDto registerDto)  {
        log.info("注册账号：{}",registerDto);
        registerService.registerInfo(registerDto);
    }
}
